<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

	<rich:panel id="Edit" styleClass="form">
		


			<a4j:form ajaxSingle="true">
				<h:panelGrid>
					<div class="attributes">
				
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Abreviatura</ui:define>
								<h:inputText value="#{editVoucher.editVoucher.abrev}"
									id="VoucherAbrev" 
									required="true" size="10"
									requiredMessage="Favor introduzca la Abreviatura"
									validatorMessage="La Abreviatura no puede ser menor a 1 o mayor a 7">
									<f:validateLength minimum="1" maximum="7" />
									<a4j:support event="onblur" />
									
								</h:inputText>
								<div class="msg_container">
								<rich:message for="VoucherAbrev"/>
								</div>
							</s:decorate>
							<div style="clear: both;" />
							
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Descripcion</ui:define>
								<h:inputText value="#{editVoucher.editVoucher.descrip}"
									id="VoucherDescrip" 
									required="true" size="20"
									requiredMessage="Favor introduzca la Descripcion"
									validatorMessage="La Descripcion no puede ser menor a 1 o mayor a 30">
									<f:validateLength minimum="1" maximum="30" />
									<a4j:support event="onblur" />
									
								</h:inputText>
								<div class="msg_container">
								<rich:message for="VoucherDescrip"/>
								</div>
							</s:decorate>
							<div style="clear: both;" />
							
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Oeracion en Stock</ui:define>
								<rich:comboBox id="VoucherOperateSotck" value="#{editVoucher.editVoucher.operateStock}" >
								    <f:selectItem itemLabel="Suma" itemValue="N" />
									<f:selectItem itemLabel="Suma" itemValue="S" />
									<f:selectItem itemLabel="Resta" itemValue="R"/>
									<a4j:support event="onblur" />
									
								</rich:comboBox>
								<div class="msg_container">
									<rich:message for="VoucherOperateSotck"/>
								</div>
							</s:decorate>
							
							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Visualizar en recibo</ui:define>
								<h:selectBooleanCheckbox value="#{editVoucher.editVoucher.viewAtReceive}" 
								id="VoucherViewAtReceive"
								required="false">
								<a4j:support event="onblur" />
								</h:selectBooleanCheckbox>
								
								<div class="msg_container">
									<rich:message for="VoucherViewAtReceive"/>
								</div>
							</s:decorate>

							<s:decorate template="/layout/input.xhtml">
								<ui:define name="label">Activo</ui:define>
								<h:selectBooleanCheckbox value="#{editVoucher.editVoucher.status}" 
								id="VoucherStatus"
								required="false"
								disabled="true" >
								<a4j:support event="onblur" />
								</h:selectBooleanCheckbox>
								
								<div class="msg_container">
									<rich:message for="VoucherStatus"/>
								</div>
							</s:decorate>
					</div>
		
		
				<s:decorate template="/layout/displayButton.xhtml">
					<a4j:commandButton value="Guardar"
						action="#{editVoucher.dataToEditUpd()}"
						oncomplete="#{rich:component('modalPanel')}.hide()"
						reRender="voucherGridForm, voucherForm" />
					<rich:spacer width="20px" />
					<a4j:commandButton value="Cancelar"
						oncomplete="#{rich:component('modalPanel')}.hide()">
					</a4j:commandButton>
				</s:decorate>
			
			</h:panelGrid>
		</a4j:form>
	</rich:panel>
</ui:composition>